﻿using Xunit;

namespace Gamemaster.RollTests
{
    public class PlusTests
    {
        [Fact]
        public void AddsPositiveNumberCorrectly()
        {
            int roll = 13;
            int modifier = 3;

            int expected = 16;
            int actual = roll.Plus(modifier);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void AddsNegativeNumbersCorrectly()
        {
            int roll = 13;
            int modifier = -3;

            int expected = 10;
            int actual = roll.Plus(modifier);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void MinimumValueIsZero()
        {
            int roll = 2;
            int penalty = -3;

            int expected = 0;
            int actual = roll.Plus(penalty);

            Assert.Equal(expected, actual);
        }
    }
}
